// 求职意向相关的接口函数
import request from '@/utils/http.js'

// 创建求职意向
export const creatIntentionAPI = (data) => {
    return request({
        url: '/intention/creatIntention',
        method: 'post',
        data: {
            intentionUserId: data.intentionUserId,
            intentionStudentId: data.intentionStudentId,
            intentionName: data.intentionName,
            intentionContactInfo: data.intentionContactInfo,
            intentionHighestEducation: data.intentionHighestEducation,
            intentionMajor: data.intentionMajor,
            intentionJobTitle: data.intentionJobTitle,
            intentionLocation: data.intentionLocation,
            intentionExpectedSalary: data.intentionExpectedSalary,
            intentionJobType: data.intentionJobType,
            intentionAvailableStartDate: data.intentionAvailableStartDate,
            intentionStatus: data.intentionStatus,
            tagsList: data.tagsList,
            jobsList: data.jobsList,
        }
    })
}

//分页查询求职意向
export const pageIntentionAPI = (data) => {
    return request({
        url: '/intention/pageIntention',
        method: 'post',
        data: {
            pageCurrent: data.pageCurrent,
            pageSize: data.pageSize,
            intentionHighestEducation: data.intentionHighestEducation,
            intentionLocation: data.intentionLocation,
            intentionJobType: data.intentionJobType,
            intentionStatus: data.intentionStatus,
        }
    })
}

//修改求职意向
export const updateIntentionByIdAPI = (data) => {
    return request({
        url: '/intention/updateIntentionById',
        method: 'post',
        data: {
            intentionId: data.intentionId,
            intentionUserId: data.intentionUserId,
            intentionStudentId: data.intentionStudentId,
            intentionName: data.intentionName,
            intentionContactInfo: data.intentionContactInfo,
            intentionHighestEducation: data.intentionHighestEducation,
            intentionMajor: data.intentionMajor,
            intentionJobTitle: data.intentionJobTitle,
            intentionLocation: data.intentionLocation,
            intentionExpectedSalary: data.intentionExpectedSalary,
            intentionJobType: data.intentionJobType,
            intentionAvailableStartDate: data.intentionAvailableStartDate,
            intentionStatus: data.intentionStatus,
            tagsList: data.tagsList,
            jobsList: data.jobsList,
        }
    })
}

//删除求职意向
export const deleteIntentionByIdAPI = (intentionId) => {
    return request({
        url: '/intention/deleteIntentionById',
        method: 'post',
        params: {intentionId}
    })
}

//查询求职意向根据求职意向绑定的用户ID
export const queryIntentionByUserIdAPI = (intentionUserId) => {
    return request({
        url: '/intention/queryIntentionByUserId',
        method: 'post',
        params: {intentionUserId}
    })
}
//根据企业的发布的岗位标题查询对应的求职意向，查询出简历
export const queryIntentionByJobTitleAPI = (jobTitle) => {
    return request({
        url: '/intention/queryIntentionByJobTitle',
        method: 'post',
        data: jobTitle
    })
}
//根据企业的发布的岗位行业查询对应的求职意向，查询出简历
export const queryIntentionByJobIndustryAPI = (jobIndustry) => {
    return request({
        url: '/intention/queryIntentionByJobIndustry',
        method: 'post',
        data:jobIndustry
    })
}
